/*
 * @Author: TC (tengchao@taqu.cn)
 * @Date: 2025-10-09 19:54:02
 * @Last Modified by: TC (tengchao@taqu.cn)
 * @Last Modified time: 2025-10-10 11:37:50
 */

import { app } from "db://assets/FrameWork/App";
import { EMoleConfigConst } from "../Const/MoleConfigConst";

/**
 * 商城配置
 */
export namespace nsMoleShopCfg {
    /**
     * 获取所有商城配置
     * @returns
     */
    export function getAllShopCfgs(): IMoleCfgInterface.IShop[] {
        const cfgs = app.cfgMgr.getCfg(EMoleConfigConst.Shop);
        if (!cfgs || cfgs.length <= 0) {
            app.log.error(`未找到商城配置`);
            return null;
        }
        return cfgs;
    }
}
